<?php

class Core_Template_Html_Grid_Cell_Status_Link extends Soul_Template_Html_Grid_Cell_Link {

	public function __construct(){
		parent::__construct();
	}
	
	public function getFormatText(){
		$text = parent::getFormatText();
        $translator = $GLOBALS[RC]->getLanguage();
        switch($text){
        	case CONSTANT_STATUS_DRAFT:
        		return '<span>'.$translator->__('system.status.draft').'</span>';
        	case CONSTANT_STATUS_PENDING:
        		return '<span class="yellow">'.$translator->__('system.status.pending').'</span>';
        	case CONSTANT_STATUS_PUBLISHED:
        		return '<span class="green">'.$translator->__('system.status.published').'</span>';
        	case CONSTANT_STATUS_FORBIDDEN:
        		return '<span class="red">'.$translator->__('system.status.forbidden').'</span>';
        	case CONSTANT_STATUS_ENABLED:
        		return '<span class="green">'.$translator->__('system.status.enabled').'</span>';
        	case CONSTANT_STATUS_DISABLED:
        		return '<span class="red">'.$translator->__('system.status.disabled').'</span>';
			case CONSTANT_STATUS_EXPIRED:
        		return '<span class="red">'.$translator->__('system.status.expried').'</span>';
        	case CONSTANT_STATUS_PROCESSING:
        		return '<span class="yellow">'.$translator->__('system.status.processing').'</span>';         		        		      		        		        		
        }
        return '<span>' . $text . '</span>';		
	}
}